package com.dubbo.consumer.service;

import com.dubbo.api.CustomService;
import org.apache.dubbo.config.annotation.Reference;
import org.springframework.stereotype.Component;


/**
 * @author lihongfeng
 */
@Component
public class ServiceProxy {

    /**
     * 注入分布式的远程服务的对象
     */
    @Reference
    private CustomService service;

    public void invokeMethod1() throws InterruptedException {
        service.method1();
    }

    public void invokeMethod2() throws InterruptedException {
        service.method2();
    }

    public void invokeMethod3() throws InterruptedException {
        service.method3();
    }
}
